import type {UserType} from "../models/User";

let currentUser: UserType;

/**
 * 设置当前用户
 * @param user
 */
const setCurrentUserState = (user: UserType) => {
    currentUser = user;
}

/**
 * 获取当前用户
 */
const getCurrentUserState = (): UserType => {
    return currentUser;
}

export {
    setCurrentUserState,
    getCurrentUserState
}
